<?php

class Controller
{
	/**
	 * @var Template
	 */
	protected $template = NULL;
	
	protected $input = NULL;
	
	private static $instance;
	
	public $config = NULL;
	
    public function __construct()
    {
		self::$instance = $this;
    	$this->load = new Loader;
    	$this->load->config();
    	if ($this->config->debug) 
    	{
    		ini_set('display_errors', '1');
    		error_reporting(E_ALL);
    	}
    	$this->template = $this->load->class('template', true);
    }
    
    /**
     * @return Controller
     */
    public static function get_instance()
    {
    	return self::$instance;
    }
}